﻿//初始化
$(document).ready(function(){
    if ($("#vcode").val() != ""){
        $("#vcode").val("");
        changevocde();
    }
});

//修改验证码
function changevocde(){
    $("#vcodeimg").attr("src", "/validatecode?width=68&height=27&tm=" + Math.round(Math.random() * 1000000));
}

//表单验证
function checkform(){
	if ($("#mobile").val() == "" || $("#mobile").val() == "手机号"){
		alert("请输入手机号");
		return false;
	}
	if ($("#password").val() == "" || $("#password").val() == "密码"){
		alert("请输入密码");
		return false;
	}
	if ($("#vcode").val() == "" || $("#vcode").val() == "验证码"){
		alert("请输入验证码");
		return false;
    }
	return true;
}